import time
import threading

from paddleocr import PaddleOCR, PPStructure


class PPSAi:

    def __init__(self):
        self.pps_item = PPStructure(show_log=True, structure_version='PP-StructureV2')

    def rec_img(self, img_path):
        try:
            res = self.pps_item(img_path)
        except:
            res = []
        return res


pps_ai = PPSAi()